﻿@using PagedList.Mvc;
@using PagedList;
@model PagedList.IPagedList<WineStore.Models.News>
@{
    ViewBag.Title = "News";
    Layout = "~/Views/Shared/HomeLayout.cshtml";
}

<link href="../../Content/PagedList.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
    $(function () {
        /* For zebra striping */
        $("table tr:nth-child(odd)").addClass("odd-row");
        /* For cell text alignment */
        $("table td:first-child, table th:first-child").addClass("first");
        /* For removing the last border */
        $("table td:last-child, table th:last-child").addClass("last");
    });
</script>
<div class="center_title_bar"><img style="position:relative; top:3px;" src="../../Content/Images/Home/down_gray.png"/> Tin tức</div>

<div class="prod_box_big">
   

            @foreach (var item in Model)
            {
                <div class="entry" style="width: 586px; margin-left:-14px; margin-bottom:2px; background-color:#fff;">
                    <div class="entry-header">
                                <h3 class="title">@Html.ActionLink(item.NewsTitle_VN, "NewsDetail", "Home", new { id = item.NewsId }, null) </h3>
                        
                    </div>
                    <!-- end .entry-header -->
                    <div class="entry-content">
                        <a href="../../Home/NewsDetail?id=@item.NewsId">
                            <img src="../../Content/Images/News/@item.NewsImage" width="120" height="120" alt="" class="entry-image" /></a>
                        <div style="font-size:x-small; color:brown;">@item.DateAdd</div>
                        <p>@item.NewsDescription_VN</p>
                    </div>
                    <!-- end .entry-content -->
                </div>
                <!-- end .entry -->
            }
            <div style="text-align:center; margin-left:-50px;padding-bottom:10px;">@Html.PagedListPager(Model, page => Url.Action("News", new { page = page }), (PagedListRenderOptions)ViewBag.Pro)</div>
            
      
</div>
